<?php session_start();
/**
* @package		ReservatieComponent voor ouderavonden van Atheneum Alicebourg Lanaken.
* @copyright	Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		0.1
* @license		GNU/GPL, see LICENSE.php
**/
?><head>
<link rel="stylesheet" href="../../css/template_css.css" type="text/css"/> 
</head>
<body>
<?php 
include ("../../include/config.php");
include ("../../include/db.php");
include ("../../include/header.php");
$idedit = $_GET["id"];
?><p class="pagenavbar" align="center" ><?php $navigatieadmin ; ?><br><br></p>
<?php 
if(isset($_SESSION["myusername"])){
	if ($_SESSION["admin"] == "$adminid") {



$sql = "SELECT * FROM $tbvak WHERE OpdrachtID='$idedit'";
$result=mysql_query($sql);

while ($row = mysql_fetch_array($result)) {
   $id =  $row["OpdrachtID"];  
   $klas = $row["Klas"];
   $vak = $row["Vak"];
   $lkid = $row["LeerkrachtID"];
   $lknaam = $row["Leerkrachtnaam"];
   $ktit = $row["Klastitularis"];
   $lok = $row["Lokaal"];
  }
?>
<form id="form1" name="form1" method="post" action="vak-edit_process.php?stat=update&id=<?php echo "$idedit";?>">
<table width="100%" border="0" align="center" class="moduletable-latest">
  <tr>
    <td width="10%">Leerkrachtnaam</td>
    <td><input type="text" name="LKnaam" id="LKnaam" value="<?php echo "$lknaam"; ?>" /></td>
  </tr>
  <tr>
    <td>LeerkrachtID</td>

    <td><input type="text" name="LKID" id="LKID" value="<?php echo "$lkid"; ?>"/></td>
  </tr>
  <tr>
    <td>Klastitularis</td>
    <td><select name="Klastitularis" id="Klastitularis">
      <option value="<?php echo "$ktit"; ?>"><?php echo "$ktit"; ?></option>
	  <option value=""></option>
	  <option value="Ja">Ja</option>
      <option value="Nee">Nee</option>

    </select>    </td>
  </tr>
  <tr>
    <td>Klas</td>
    <td><input type="text" name="Klas" id="Klas" value="<?php echo "$klas"; ?>"/></td>
  </tr>
  <tr>
    <td>Vak</td>

    <td><input type="text" name="Vak" id="Vak" value="<?php echo "$vak"; ?>"/></td>
  </tr>
  <tr>
    <td>Lokaal</td>
    <td><input type="text" name="Lokaal" id="Lokaal" value="<?php echo "$lok"; ?>"/></td>
  </tr>
  <tr>
    <!--<td><a href="vak-edit_process.php?stat=update&id=<?php echo "$idedit";?>">Update record </a></td>-->
    <td><input name="Update record" type="submit" id="Update record" value="Update"></td>
    <td><a href="vak-edit_process.php?stat=delete&id=<?php echo "$idedit";?>">Verwijder record </a></td>
  </tr>
</table>
</form><hr>
<?php

  
  }}
  else {
  header("location:../index.php");
  }
  ?>
